package com.lxmes.base.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.base.mapper.JcProductionDayMapper;
import com.lxmes.base.domain.JcProductionDay;
import com.lxmes.base.service.IJcProductionDayService;

/**
 * 生产日时维护Service业务层处理
 * 
 * @author 张志煜
 * @date 2022-11-29
 */
@Service
public class JcProductionDayServiceImpl implements IJcProductionDayService 
{
    @Autowired
    private JcProductionDayMapper jcProductionDayMapper;

    /**
     * 查询生产日时维护
     * 
     * @param id 生产日时维护主键
     * @return 生产日时维护
     */
    @Override
    public JcProductionDay selectJcProductionDayById(Long id)
    {
        return jcProductionDayMapper.selectJcProductionDayById(id);
    }

    /**
     * 查询生产日时维护列表
     * 
     * @param jcProductionDay 生产日时维护
     * @return 生产日时维护
     */
    @Override
    public List<JcProductionDay> selectJcProductionDayList(JcProductionDay jcProductionDay)
    {
        return jcProductionDayMapper.selectJcProductionDayList(jcProductionDay);
    }

    /**
     * 新增生产日时维护
     * 
     * @param jcProductionDay 生产日时维护
     * @return 结果
     */
    @Override
    public int insertJcProductionDay(JcProductionDay jcProductionDay)
    {
        jcProductionDay.setCreateTime(DateUtils.getNowDate());
        return jcProductionDayMapper.insertJcProductionDay(jcProductionDay);
    }

    /**
     * 修改生产日时维护
     * 
     * @param jcProductionDay 生产日时维护
     * @return 结果
     */
    @Override
    public int updateJcProductionDay(JcProductionDay jcProductionDay)
    {
        jcProductionDay.setUpdateTime(DateUtils.getNowDate());
        return jcProductionDayMapper.updateJcProductionDay(jcProductionDay);
    }

    /**
     * 批量删除生产日时维护
     * 
     * @param ids 需要删除的生产日时维护主键
     * @return 结果
     */
    @Override
    public int deleteJcProductionDayByIds(Long[] ids)
    {
        return jcProductionDayMapper.deleteJcProductionDayByIds(ids);
    }

    /**
     * 删除生产日时维护信息
     * 
     * @param id 生产日时维护主键
     * @return 结果
     */
    @Override
    public int deleteJcProductionDayById(Long id)
    {
        return jcProductionDayMapper.deleteJcProductionDayById(id);
    }
}
